<?php

class Wlib_Controller_Action_Helper_FormJsonRender extends Zend_Controller_Action_Helper_Abstract
{
    public function direct($form)
    {
        if(!$form->isErrors()) {
            $viewJsonObj['isValid'] = 1;
            $form->reset();
        }
        $viewJsonObj['content'] = $form->render();
        echo Zend_Json::encode($viewJsonObj);
    }
}
